Digital systems encode data streams to reduce the amount of data that needs to be sent over a network. Encoding can also protect data from being illegally accessed.
When encoding audio-visual data, a separate video encoder and audio encoder are utilized, and the separately encoded data streams then need to be multiplexed together by a multiplexer. Timing of the streams is therefore very important. If some error occurs in the timing, there will be a discrepancy between the sound and the picture as seen by a viewer.
The timing mismatch can occur for a number of reasons. Occasionally, a video encoder will abort during encoding, for example due to processing of bad data. The video encoder then needs to be restarted, however, encoded audio frames are still being continuously received by the multiplexer during this restarting period. As no video frames exist to be multiplexed with the incoming audio frames, a timing mismatch will occur and accumulate over time.
In another example, when a data source system changes, the video encoder encodes at a lower frame rate than expected. The actual time a video frame arrives will therefore be later than the expected time the video frame should arrive. Although the initial error is small, over time the error will accumulate and eventually become obvious to a viewer.
In a last example, the signal source is unstable. In this case the video encoder will attempt to encode at the original frame rate, but will end up encoding at a lower frame rate than expected due to the instability of the signal.